/**
 * @description 存储配置
 * @author chengpeng
 */

const {
    isProd
} = require('../utils/env')

// redis 配置 
let REDIS_CONFIG = {
    port: 6379,
    host: '127.0.0.1'
}

// mysql 配置
let MYSQL_CONFIG = {
    host: 'localhost',
    user: 'root',
    password: 'root',
    prot: '3306',
    database: 'twitter_db'
}

// 线上配置
if (isProd) {
    REDIS_CONFIG = {
        port: 6379,
        host: '127.0.0.1'
    }

    MYSQL_CONFIG = {
        host: 'localhost',
        user: 'root',
        password: 'root',
        prot: '3306',
        database: 'twitter_db'
    }
}

module.exports = {
    REDIS_CONFIG,
    MYSQL_CONFIG
}